/**
 * 
 */
package com.wubo.sec.core;

import java.util.List;

import org.springframework.security.core.session.SessionRegistry;

/**
 * @author WuBo
 * @CreateDate 2010-12-22
 * @version 1.0.1
 */
public class UserOnlineManager {

	private SessionRegistry sessionRegistry;

	public SessionRegistry getSessionRegistry() {
		return sessionRegistry;
	}

	public void setSessionRegistry(SessionRegistry sessionRegistry) {
		this.sessionRegistry = sessionRegistry;
	}
	
	public List<Object> getOnlineUsers(){
		return sessionRegistry.getAllPrincipals();
	}
}
